#ifndef __HASH_MAP_H_
#define __HASH_MAP_H_

#define hash_size 71
#define HASH_MAX_SIZE 1000

typedef struct hash_obj {
	void *data;
	size_t key;
	struct hash_obj *next_ob;
} hash_obj_t;

typedef struct hash_map {
	hash_obj_t *list; // for free objects
	hash_obj_t *objects[hash_size]; // for hashing
	hash_obj_t elems[HASH_MAX_SIZE];
} hash_map_t;

void map_init(hash_map_t *hm);
int map_insert(hash_map_t *hm, size_t key, void *obj);
void *map_get(hash_map_t *hm, size_t key);
void *map_delete(hash_map_t *hm, size_t key);

#endif // __HASH_MAP_H_
